package ClassData;

import ClassData.Visitor.IVisitor;
import ClassData.Visitor.IVisitorElement;

public class ConstantPoolName_Info extends ConstantPoolInfo implements IVisitorElement {

	short name_index;
	short descriptor_index;
	
	public ConstantPoolName_Info(short NameIndex, short DescriptorIndex) {
		name_index=NameIndex;
		descriptor_index=DescriptorIndex;
	}
	
	public short getNameIndex() {
		return(name_index);
	}

	public short getDescriptorIndex() {
		return(descriptor_index);
	}

	/**
	 * returns type of this constant pool entry
	 * 
	 */	
	public int getType() {
		return(CONSTANT_NameAndType);
	}
	
	@Override
	public void receive_Visitor(IVisitor visitor) {
		visitor.visit_ConstantPoolName_info(this);
	}
	
}
